package com.example.composite.Impi;

import com.example.composite.Employee;

/**
 * 叶子结点，普通员工
 */
public class IndividualEmployeeImpi implements Employee {
    private String name;
    private String position;

    public IndividualEmployeeImpi(String name, String position) {
        this.name = name;
        this.position = position;
    }

    @Override
    public void showDetails() {
        System.out.println("Name: " + name + " Position: " + position);
    }

    @Override
    public void add(Employee employee) {
        System.out.println("员工不能执行添加");
    }

    @Override
    public void remove(Employee employee) {
        System.out.println("员工不能执行删除");
    }
}
